<?php
html::printPath(html::createCrudPath('room', $room, 'code', 'code'));
$msg->printMessages();

$fb = new FormBuilder('room', $room);
$fb->comboBox('building_code', $buildingOptions)->required();
$fb->text('code')->required()->readOnly(sql::isPersistent($building));
$fb->comboBox('accomodation_type_code', $accomodationTypeOptions);
$fb->integer('capacity');
$fb->combobox('gender', $genderOptions);
$fb->textarea('notes');
if (! sql::isPersistent($room)) {
    $fb->delimiter(text::get('application.firstTranslation'));
    $fb->comboBox('language_code', $languageOptions)->required();
    $fb->text('name')->required();
    $fb->textarea('description')->required();
}
$fb->submitButton();
$fb->write();
